package com.itheima.mapper;

import com.itheima.pojo.Adopt;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AdoptMapper {
    @Insert("insert into adopt(id,user_id,pet_id,time,status)" +
            "values(#{id},#{userId},#{petId},#{time},#{status})")
    void add(Adopt adopt);

    List<Adopt> list(Integer petId,String status);

    @Delete("delete from adopt where id = #{id}")
    void delete(Adopt adopt);
}
